<h2>Sign up</h2>

<%= form_for(resource, :as => resource_name, :url => registration_path(resource_name)) do |f| %>
  <%= devise_error_messages! %>

  <p><%= f.label :currency %><br />
  <%= f.select :default_currency_code, Currency.all.map {|c| ["#{c.code} - #{c.name}", c.code]} %></p>

    <script type="text/javascript">
//    var ip = '<%#= "#{current_user.current_sign_in_ip}" %>';
        $(document).ready(function () {
            var currencyCode = countryCurrency[getCountryCode()];
            var select = $("#user_default_currency_code").val(currencyCode);
        })
    </script>
    <%= javascript_include_tag "http://www.geoplugin.net/javascript.gp", :cache => false %>
    <%= javascript_include_tag "location", :cache => true %>
    <%= javascript_include_tag "countries", :cache => true %>

  <p><%= f.label :email %><br />
  <%= f.text_field :email %></p>

  <p><%= f.label :password %><br />
  <%= f.password_field :password %></p>

  <p><%= f.label :password_confirmation %><br />
  <%= f.password_field :password_confirmation %></p>

  <p><%= f.submit "Sign up" %></p>
<% end %>

<%= render :partial => "devise/shared/links" %>
